{% extends 'layout.html' %}
{% block content %}
<div class="container">
    <table class="table table-bordered table-hover">
        <caption>手机参数信息
          {% if request.session.info %}
          &nbsp;&nbsp;<a href="/phone/{{id}}/edit/" class="btn btn-primary btn-xs">编辑</a>
          {% endif %}
        </caption>
        
        <thead>
          <tr class="row">
            <th class="col-md-3">手机名称</th>
            <th class="col-md-9">参数</th>
          </tr>
        </thead>
        <tbody>
        {% for key,val in phone_info.items %}
        {% if key != 'id' %}
          <tr class="row">
            <th class="col-md-3">{{key|upper}}</th>
              {% if val %}
              <td class="col-md-9">{{val}}</td>
              {% else %}
              <td class="col-md-9">空</td>
              {% endif %}
          </tr>
        {% endif %}
        {% endfor %}
        </tbody>
      </table>
</div>
{% endblock %}